'use strict';

import React from 'react';
import { Link } from 'react-router';
import { Navigation, Icon } from 'qnui';
import classnames from 'classnames';
import Tools from 'utils/index';
import linkConfig from 'utils/urls';
import './index.scss';
const Item = Navigation.Item;
const Group = Navigation.Group;
const links = Tools.isLocal() ? linkConfig.local : linkConfig.onLine;

class SideMenu extends React.Component {

  render() {
    let className = classnames({
      "left-menu": true
    });
    return (
      <div className={className}>
        <Navigation
          style={{marginTop:"5px"}}
          type="tree"
          activeDirection="right"
        >
          <li className="qn-navigation-vertical" style={{backgroundColor:"#E4F0FD",color:"#1170BC"}}>
			<Icon type ="all" />
			<span>常用操作</span>
		  </li>
		  <Item
			  itemid="1"
			  text="创建活动"
			  link={links.home}
			  icon="survey"
				  opened="true"
			  >
		  		<Navigation>
				  <Item
					  itemid="11"
					  text="店内打折"
					  link={links.home_general}
					  icon="store"
					  ></Item>
				  <Item
					  itemid="12"
					  text="推广打折"
					  link={links.home_qrcode}
					  icon="scanning"
					  ></Item>
				  </Navigation>
		  
		  </Item>
		  <Item
			  itemid="2"
			  text="活动列表"
			  icon="nav-list"
			  link={links.ring_tags}
			  >
		  </Item>
		  {/*
		  <Item
			  itemid="3"
			  text="倒计时折扣"
			  link={links.ring_tags}
			  icon="process"
			  ></Item>
		  <Item
			  itemid="4"
			  text="二维码标签"
			  icon="scanning"
			  link={links.qrring}
			  >
		  </Item>
		  */}
		  <Item
			  itemid="5"
			  text="页面管理"
			  icon="gifts"
			  link={links.hpage}
			  >
		  </Item>
		  <Item
			  itemid="6"
			  text="资源管理"
			  icon="set"
			  link={links.resource}
			  >
		  </Item>
		{/*
		  
		  <Item
			  itemid="2"
			  text="奖池管理"
			  icon="gifts"
			  link="http://mouton.admin.tmall.com/list.htm"
			  target="_blank"
			  >
			  </Item>
		  <Item
			  itemid="4"
			  text="任务安排"
			  icon="favorite"
			  // link="http://h5.m.taobao.com/qn/pc/task-center.html?appkey=21790264&category=renwuzhongxin"
			  link="aliim:directuseplugin?appkey=21790264"
			  target="_blank"
			  >
			  </Item>
		  <Item
			  itemid="5"
			  text="聚星台"
			  icon="favorite"
			  link="https://juxingtai.taobao.com/jxt/index.htm"
			  target="_blank"
			  >
			  </Item>
		*/}
        </Navigation>
      </div>
    );
  }
}

export default SideMenu;
